-
Notifications
You must be signed in to change notification settings - Fork 88
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use Symfony Webpack Encore instead of Assetic or Component Manager #63
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice one! regarding the merging, it could make sense to merge this one first (i have some minor input that could be adressed before merging) and i can rebase the documentation cleanup on this, and move the asset management to the documentation.
this change would be really good to get merged before releasing 3.0. the documentation cleanup is less critical.
i noticed that this repository has no CHANGELOG.md file. i guess most of the time this will be taken as starting point and people won't track the original repository. still, i wonder if it would make sense to add a changelog and track such important things, for people who want to use this repository to update their sculpin installation. or alternatively, we could add a text to blog.sculpin.io that explains how to upgrade your sculpin installation to encore.
<link rel="apple-touch-icon" sizes="512x512" href="{{ site.url }}/images/jackson/512x512.png"> | ||
<link rel="apple-touch-icon" sizes="1024x1024" href="{{ site.url }}/images/jackson/1024x1024.png"> | ||
<link rel="apple-touch-icon" sizes="2048x2048" href="{{ site.url }}/images/jackson/2048x2048.png"> | ||
<link rel="shortcut icon" sizes="76x76" href="{{ site.url }}/build/jackson/76x76.png"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do we need to move the images to build, or could we keep them in the old location? this could be annoying for people who customized their templates. does encore do something with the images?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually, all it does is copy them into the build/assets directory. I can move them back to how they were but personally I find it neater to have css + js + images all in the assets folder.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Personally I prefer to have different folders for css
, js
, and images
because putting everything in one tends to get messy over time. If this could be configurable that would be even better imho, giving flexibility to everyone setting up how they like it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i see the point of having "images" that are basically icons and stuff that is referenced from the css in the same main folder as the css itself. content images is a different topic.
i don't think there is any configuration needed - encore copies them when they are in asset, otherwise the template needs to reference the original path. and having a configuration injected into the template feels too indirect to me.
what if we call that folder "icons" instead of "images" but keep it in assets? would that help to be more clear what it is meant for?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, when I said "css + js + images all in the assets folder," I meant that there would be separate folders for css, js, and images, all within the assets folder. (Which is how the project is set up in this PR.)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The folders that Encore copies to and from are already configured within the webpack.config.js file, see: https://github.com/sculpin/sculpin-blog-skeleton/blob/2f26a9ce05aedd5db40817e7197948ebe066da3b/webpack.config.js
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As the images in question are really only icons, I think it's a good compromise to rename the folder 'icons' in this example.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The folders that Encore copies to and from are already configured within the webpack.config.js file, see: /webpack.config.js@
2f26a9c
Ah ok great! Cause if for some reason my images path changes in blog posts all paths on the site and external references would have to be updated. But looking at that I can change that to my liking and don't have to worry about it 👍
2f26a9c
to
381f7ab
Compare
I like the blog post idea. I think the changelog approach doesn't quite work in this context, but perhaps a github release notes entry with a link to the blog post would be good. |
@bellisk would you be up to write that blog post? as the blog is sculpin, it can be done as a pull request against the blog.sculpin.io repository. if you don't want to, i can try to do something. and can you please rebase? there is a conflict in composer.json/.lock now, from me updating to sculpin/sculpin to 3. |
381f7ab
to
db46724
Compare
db46724
to
c0f1ffd
Compare
Rebased to fix the composer.lock conflict. |
Yes, I can write the blog post. That's a cool idea. :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cool, looks good to me!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me. I'll get it merged.
Fixes sculpin/sculpin#404